﻿/* Open source distributed without warranties of any kind. */

namespace Transcriber.Plugins
{
    #region Using
    using System.Xml.Serialization;
    #endregion

    /// <summary>
    /// Base class of <see cref="Rule"/> output nodes.
    /// </summary>
    public abstract class OutputNode
    {
        private string mEvaluator;
        private string mText;

        /// <summary>
        /// Gets a value indicating whether or not the
        /// content of this node should be searched when
        /// matching subsequent rules.
        /// </summary>
        /// <value>
        /// The valueindicating whether or not the
        /// content of this node should be searched when
        /// matching subsequent rules.
        /// </value>
        [XmlIgnore]
        public virtual bool SearchContent
        {
            get { return false; }
        }

        /// <summary>
        /// Gets or sets the evaluator type name.
        /// </summary>
        /// <value>The evaluator type name.</value>
        [XmlAttribute("evaluator")]
        public string Evaluator
        {
            get { return this.mEvaluator; }
            set { this.mEvaluator = value; }
        }

        /// <summary>
        /// Gets or sets the text.
        /// </summary>
        /// <value>The text.</value>
        [XmlText]
        public string Text
        {
            get { return this.mText; }
            set { this.mText = value; }
        }
    }
}
